from rest_framework.serializers import ModelSerializer

from category.models import Category


class CategorySerializer(ModelSerializer):
    """分类序列化器"""
    class Meta:
        model = Category
        fields = '__all__'


class AddCatesSerializer(ModelSerializer):
    """添加分类序列化器"""
    class Meta:
        model = Category
        fields = ('name', 'alias')


